<?php
namespace App\Module\User\Controller;

use App\Common\Controller\AbstractController;
use App\Module\User\Service\ActivityService;
use Hyperf\Di\Annotation\Inject;

class ActivityController extends AbstractController{

    /**
     * @Inject()
     * @var ActivityService $activityService
     */
    private $activityService;

    public function search(){
        $status = $this->request->input("status");
        $pagesize = $this->request->input("pagesize");

        return $this->response->json($this->activityService->search($status,$pagesize));
    }

    public function getById(int $id){
        return $this->response->json($this->activityService->getById($id));
    }

    public function mine(){
        $status = $this->request->input("status");
        $pagesize = $this->request->input("pagesize");

        return $this->response->json($this->activityService->mine($status,$pagesize));
    }
}